
//树状扁平化
function Flatten (data) {
  return data.reduce((pre, cur) => {
    const { id, className, pId, status, navigation, children = [] } = cur
    return pre.concat([{ id, className, pId, status, navigation }], Flatten(children))
  }, []);
}

export {Flatten}

